<?php	$atr=array(
					"name"=>"overTime",
					"onsubmit"=>"return checkOverTime()"
				  ); 
	echo form_open('overTime/insert',$atr); ?> 
<?php $bar="OverTime List" ;?>
<table id="box-table-a" cellspacing="1" align="right" width="900px">
 	<tr><td colspan=12 align=right class=bar><?php echo $bar;?></td></tr>
   		<tr>
   			<th>OverTime_ID</th>
   			<th>OT_Weekday</th>
   			<th>Time_Saturday</th>
   			<th>OT_Saturday</th>
   			<th>OT_Sunday</th>
   			<th>OT_Holiday</th> 
   			<th>ON_Weekday</th>
   			<th>ON_Sunday</th>
   			<th>ON_Holiday</th>
   			<th>EffectiveDate</th>
   			<th>Type</th>
   			<th>Action</th>  			
   		</tr> 		
  		
<?php if (isset($result)){?>
   	
   		<?php foreach ($result as $row):?> 
		<tr>			
			<td class="row1"><?php echo $row->OverTime_ID; ?> </td>
			<td class="row1"><?php echo $row->OT_Weekday;?> </td>
			<td class="row1"><?php echo $row->Time_Saturday; ?> </td>
			<td class="row1"><?php echo $row->OT_Saturday; ?> </td>
			<td class="row1"><?php echo $row->OT_Sunday; ?> </td>
			<td class="row1"><?php echo $row->OT_Holiday; ?> </td>
			<td class="row1"><?php echo $row->ON_Weekday;?> </td>
			<td class="row1"><?php echo $row->ON_Sunday; ?> </td>
			<td class="row1"><?php echo $row->ON_Holiday; ?> </td>
			<td class="row1"><?php echo $row->EffectiveDate ;?> </td>
			<td class="row1"><?php echo $row->Type ;?> </td>
			<td class="row1" align="center">
				 <?php echo '<id=a>'.anchor("overTime/edit/$row->OverTime_ID",'<img src ="'.base_url().'templates/images/icons/edit.gif" title="Click here to modify"/>').'</a>';?>
				 <?php echo '<id=a  onclick="return checkLink();">'.anchor("overTime/delete/$row->OverTime_ID",'<img src ="'.base_url().'templates/images/icons/delete.png" title="Click here to delete"/>').'</a>';?> 
			</td>		
		</tr>	   
 		<?php endforeach; ?>				
   		<tr>   			
   			<td><input type="text" name ="OverTime_ID" size="7" readonly="readonly"/></td>
   			<td><input type "text" name ="OT_Weekday" size="7"/></td>
   			<td><input type="text" name ="Time_Saturday"  size="7"/></td>
   			<td><input type="text" name ="OT_Saturday"  size="7"/></td>
   			<td><input type="text" name ="OT_Sunday"  size="7"/></td>
   			<td><input type="text" name ="OT_Holiday"  size="7"/></td>
   			<td><input type "text" name ="ON_Weekday" size="7"/></td>
   			<td><input type="text" name ="ON_Sunday"  size="7"/></td>
   			<td><input type="text" name ="ON_Holiday" size="7"/></td>
   			<td><input type "text" name ="EffectiveDate" size="7" onkeyup="dtval(this,event)" maxlength="10"/></td>
   			<td><?php echo form_dropdown('Type', $type, 'large');?></td>
   			<td align="center" ><input type="submit" id="submit" value="insert" size="5"/> </td>
   		</tr>
   		<tr>
   			<td colspan="12"><?php echo $this->pagination->create_links(); // tạo link phân trang?>  </td>
   		</tr>
   		<tr>
   			<td colspan="12" id="abc"> 
   				<?php if (isset($error)){
					echo "<br/>";   			
			   		echo $error;
					echo '<br/>';
					form_close();
		   		}?>
		   		
		   	 </td>
   		</tr>
   	</table> 		  	
   	    			   	
 <?php }?>
